#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.63)
AC_INIT([libfake437],[0.22],[endgame.dos@gmail.com])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([include/fake437.h])
AM_INIT_AUTOMAKE([foreign -Wall -Werror no-dist-gzip dist-bzip2])
LT_INIT([win32-dll])

AC_ARG_WITH([pkg-config-dir],
            [AS_HELP_STRING([--with-pkg-config-dir=DIR],
                            [Put fake437.pc in DIR @<:@LIBDIR/pkgconfig@:>@])],
            [pkgconfigdir=$withval],
            [pkgconfigdir=$libdir/pkgconfig])
AC_SUBST([pkgconfigdir])

# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O

# Checks for libraries.
PKG_CHECK_MODULES([SDL], [sdl], [:], [AC_MSG_ERROR([SDL is required to build.])])
SDL_L_FLAGS=`$PKG_CONFIG --libs-only-L sdl`
AC_SUBST([SDL_L_FLAGS])

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE

# Checks for library functions.

AC_CONFIG_FILES([fake437.pc])
AC_CONFIG_FILES([Makefile
                 example/Makefile
		 include/Makefile
                 src/Makefile])
AC_OUTPUT
